package com.neouton.crm.payRecords.mapper;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.neouton.crm.entity.SysUserEntity;
import com.neouton.crm.payRecords.entity.PaymentRecords;
import com.neouton.crm.payRecords.entity.PaymentRequest;
import com.neouton.crm.payRecords.entity.PaymentTable;
import com.neouton.crm.receiptRecords.entity.ReceiptRecords;
import com.neouton.crm.receiptRecords.entity.ReceiptTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Mose
* @description 针对表【payment_records(付款记录)】的数据库操作Mapper
* @createDate 2023-02-03 15:33:29
* @Entity server.PaymentRecords
*/
@Mapper
public interface PaymentRecordsMapper  {
    /**
     * 付款记录：根据id 查询信息
     *
     * @return list
     */
    List<PaymentRecords> queryPaymentRecordsPage( @Param("vo")PaymentRecords entity);
    /**
     * 付款记录：数据保存
     */
    boolean savePaymentRecords(@Param("vo")PaymentRecords entity);
    /**
     * 付款记录：数据修改
     */
    void updatePaymentRecordsById(@Param("vo")PaymentRecords entity);

    PaymentRecords queryPayRecordInfoById(@Param("payRecordsId")Integer payRecordsId);

    List<PaymentRecords> getPayRecordsByPurchaseOrderIds(@Param("poIds")List<Integer> list);

    //供应商视图接口查询
    List<PaymentRecords> getPayRecordsByPurchaseIdAndSupplierId(@Param("poIds")List<Integer> ids,@Param("supplierId")Integer supplierId);

    List<PaymentRecords> queryPayRecordedMoney(@Param("vo")PaymentRecords entity);

    List<PaymentRecords> queryHistoryPayRecordedMoney(@Param("vo")PaymentRecords entity);

    void backUpPaymentRecord( @Param("payRecordsId")Integer payRecordsId, @Param("backUserId")Integer userId);

    PaymentRecords queryPayRecordHistory(Integer approvalId);

    List<PaymentRecords> queryPaymentRecordsByProjectId(@Param("projectId") Integer projectId);

    IPage<PaymentRecords> queryPaymentRecordsListInfo(@Param("page") IPage page, @Param("entity")PaymentRecords entity, @Param("userList") List<SysUserEntity> userList);

    List<PaymentRecords> queryPaymentRecordsListInfo(@Param("entity")PaymentRecords entity, @Param("userList") List<SysUserEntity> userList);


    List<PaymentTable> queryPayTablesByIdAndPlanPeriod( @Param("vo") PaymentTable entity);

    List<PaymentRecords> queryPaymentRecordsByPayRequestId( Integer payRequestId);

    void savePaymentTable(@Param("List")List<PaymentTable> list);

    void updatePayRecordRecordsProjectIdByOpId(@Param("projectId") Integer projectId, @Param("opId") Integer opId);

    Boolean deletePayRecordsById(Integer payRecordsId);
}
